<template>
	<view class="box" :style="{  height: winHeight }">
		<image src="../../static/loginBg.png"></image>
		<text class="title">请先绑定账号后使用</text>
		<button v-if="canIUse" open-type="getUserInfo" @getuserinfo="bindGetUserInfo" class="bindBtn">立即绑定</button>
		<text v-else>请升级微信</text>
		<!-- <text class="register"> 没有账号？立即注册账号</text> -->
	</view>
</template>

<script>
	import common from '../../libs/login.js';
	import {winHeight} from '../../libs/common.js'
	import userMixins from '@/libs/userMixins.js'
	export default {
		mixins: [userMixins],
		data() {
			return {
				canIUse: uni.canIUse('button.open-type.getUserInfo'),
				userInfo: {},
				winHeight:winHeight
			}
		},
		onload() {
			
			console.log('aaa')
		},
		methods: {
			async bindGetUserInfo(e) {
				this.getTokenAndFetchUserInfo();
			}
		}
	}
</script>

<style lang="scss" scoped>
	image {
		width: 356upx;
		height: 331upx;
		display: block;
		margin: 100upx auto;
	}

	text {
		text-align: center;
		display: block;
	}

	.box {
		display: flex;
		flex-direction: column;
		justify-content: space-around;
	}

	.title {
		font-size: 32upx;
		font-family: Source Han Sans CN;
		font-weight: 400;
		color: rgba(51, 51, 51, 1);
	}

	.bindBtn {
		width: 620upx;
		height: 76upx;
		margin: 50upx auto;
		background: rgba(232, 238, 255, 1);
		border: 1upx solid rgba(60, 104, 230, 1);
		border-radius: 4upx;
		font-size: 30upx;
		font-family: Source Han Sans CN;
		font-weight: 400;
		color: rgba(60, 104, 230, 1);
	}

	.register {
		font-size: 28upx;
		font-family: Source Han Sans CN;
		font-weight: 400;
		color: rgba(60, 104, 230, 1);
		margin-bottom:50upx ;
	}

	.intro {
		font-size: 28upx;
		font-family: Source Han Sans CN;
		font-weight: 400;
		color: rgba(187, 187, 187, 1);
		line-height: 36upx;
		text-align: left;
		padding: 0 110upx;
	}
</style>
